@import "../../../ui/style/spacing";
@import "../../../ui/style/typography";

.NoteItem {
    position: relative;
    display: block;
    cursor: pointer;

    &__statusBar {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        content: " ";
    }

    &__statusIcon {
        position: absolute;
        display: inline-block;
        right: $spacing;
        top: 12px;

        > svg {
            display: block;
            width: 16px;
            height: 16px;
        }
    }

    &__wrapper {
        padding: $spacing;
    }

    &__labelWrapper {
        display: block;
        padding: 0 $spacing-third;
        margin-bottom: $spacing-third;

        > label {
            display: inline-block;
            font-size: $font-size-sm;
            line-height: $line-height-condensed;
            padding: 2px 5px;
            border-radius: 5px;
        }
    }

    &__title {
        display: block;
        padding: 0 $spacing-half;
        margin: 0 0 $spacing-half 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        //noinspection CssUnknownProperty
        -webkit-line-clamp: 2;

        font: {
            size: $font-size-md;
            weight: $font-weight-semiBold;
        };
    }

    &__createdAt {
        display: block;
        padding: 0 $spacing-half;

        font: {
            size: $font-size-sm;
        };
    }

    &__stackItemList {
        margin: $spacing-half 0 -2px 0;
        padding: 0;
        flex-wrap: wrap;
    }

    &__stackItem {
        list-style: none;
        display: inline-flex;
        align-items: center;
        margin: $spacing-third;
        height: 18px;

        > span {
            display: inline-block;
            padding: 0 $spacing-half;
            height: 18px;
            line-height: 18px;

            font: {
                size: $font-size-sm;
                weight: $font-weight-semiBold;
            };
        }
    }

    &--hasVcsStatus {
        &:not(.NoteItem--hasVcsLabel) {
            .NoteItem__title {
                padding-right: 20px;
            }
        }
    }

    &--viewMode {
        &-detail {
        }

        &-simple {
            .NoteItem__title {
                margin: 0;
            }

            .NoteItem__createdAt {
                display: none;
            }

            .NoteItem__stackItemList {
                display: none !important;
            }
        }
    }
}
